import { createRouter, createWebHashHistory } from "vue-router";

const routes = [
  {
    path: "/",
    redirect: "/home",
  },
  {
    path: "/home",
    component: () => import("../views/Home.vue"),
    children: [
      {
        path: "/home",
        redirect: "/home/index",
      },
      {
        path: "/home/index",
        component: () => import("../views/home/Index.vue"),
      },
      {
        path: "/home/wish",
        component: () => import("../views/home/Wish.vue"),
      },
      {
        path: "/home/message",
        component: () => import("../views/home/Message.vue"),
      },
      {
        path: "/home/mine",
        component: () => import("../views/home/Mine.vue"),
      },
    ]
  },
  {
    path: "/city",
    component: () => import("../views/City.vue"),
  },
  {
    path: "/commuting-looking",
    component: () => import("../views/CommutingLooking.vue"),
  },
  {
    path: "/maplooking",
    component: () => import("../views/Maplooking.vue"),
  },
  {
    path: "/roommate",
    component: () => import("../views/Roommate.vue"),
  },
  {
    path: "/scoremall",
    component: () => import("../views/ScoreMall.vue"),
  },
  {
    path: "/signin",
    component: () => import("../views/Signin.vue"),
  },
  {
    path: "/*",
    component: () => import("../views/NotFound.vue")
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes, 
})

export default router;